<template>
	<el-container style="height:100%;">
		<el-header height="80px"><MyHeader :currentUser="loginname"></MyHeader></el-header>
		<MyMain></MyMain>
	</el-container>
</template>

<script type="text/javascript">
import MyHeader from './layout/header.vue'
import MyMain from './layout/main.vue'
	export default{
		name:'index',
		components :{MyHeader,MyMain},
		data () {
			return{
				loginname:''
			}
		},
		methods:{
			loadUserInfo:function (argument) {
				this.$api.post('/user/current-user',null,r=>{
					if(r&&r.data){
						this.loginname=r.data.username
					}
				})
			}
		},
		created:function function_name(argument) {
			this.loadUserInfo()
		}
	}

</script>
<style type="text/css">
	html,body{height: 100%;}
	body{margin:0;}
	.el-header{
		background-color: #A3D755;color:#ffffff;
	}
	.el-aside{width:18%;color:#A3D755; }
</style>